extends ../layouts/default

block content
	.container: .row: .col-sm-10.col-sm-offset-1.col-md-8.col-md-offset-2
		article
			p: a(href='/blog') &larr; back to the blog
			hr
			if !data.post
				h2 Invalid Post.
			else
				header
					h1= data.post.title
					h5 Posted 
						if data.post.publishedDate
							| on #{data.post._.publishedDate.format('MMMM Do, YYYY')} 
						if data.post.categories && data.post.categories.length
							| in 
							each cat, cat_i in data.post.categories
								a(href='/blog/' + cat.key)= cat.name
								if cat_i < data.post.categories.length - 1
									| , 
								else
									|  
						if data.post.author
							| by #{data.post.author.name.first}
				.post
					if data.post.image.exists
						.image-wrap: img(src=data.post._.image.fit(750,450)).img-responsive
					!= data.post.content.full
